Core Functions

These are the "core" functions, very similar to the other BASIC dialects.

ABS(v|n)

Returns the absolute value of the argument v|n


ACOS(v|n)

Returns the arc cosine value of the argument v|n in radians


ASC(c|t)

Returns the ASCII code for the first letter in the argument c|t


ASIN(v|n)

Returns the arc sine value of the argument v|n in radians


ATAN(v|n)

Returns the arc tangent value of the argument v|n in radians


COS(v|n)

Returns the cosine value of the argument v|n in radians


DEGREE(v|n)

Converts the argument v|n (in radians) to degrees


EXP(v|n)

Returns the exponential value of v|n


FRE(v|n)

Returns the first free address:
in the Code Stack (v|n=0)
in the Number Stack (v|n=1)
or in the Text Stack (v|n=2)

or the last free address:
in the Code Stack(v|n=3)
in the Number Stack (v|n=4)
or in the Text Stack (v|n=5).

Notes:


INSTRING(c|t1, c|t2, v|n)

Searches for text string c|t2 in c|t1, starting at position v|n in the first text string

Notes:


INT(v|n)

Returns the largest integer less than or equal to the argument v|n


LEN(c|t)

Returns the length in bytes (number of characters) of c|t


LOG(v|n)

Returns the decimal logarithm of the argument v|n


LN(v|n)

Returns the natural logarithm of the argument v|n


MAX(v|n1, v|n2)

Returns the maximum value of v|n1 and v|n2


MIN(v|n1, v|n2)

Returns the minimum value of v|n1 and v|n2


NOT(v|n)

Returns the negation of the argument v|n


PEEK(v|n)

Returns the [0...65535] value at address v|n in the Code Stack which has to be in the range [1...FRE(3)]


POWER(v|n1, v|n2)

Returns v|n1 raised to power of v|n2

Notes:


RADIAN(v|n)

Converts the argument v|n (in degrees) to radians


RND(v|n)

Returns an integer pseudo-random number in the [0...v|n] range


ROUND(v|n)

Returns the nearest integer to the argument v|n


SGN(v|n)

Returns the sign of the argument v|n, 1 for positive numbers, 0 for 0, and -1 for negative numbers


SIN(v|n)

Returns the sine value of the argument v|n in radians


SQRT(v|n)

SQRT returns the square root of the argument v|n


TAN(v|n)

Returns the tangent value of the argument v|n in radians


TICKS

Returns the system ticks


TICKSPERSEC

Returns the number of ticks per second

Notes:


VAL(c|t)

Returns the numerical value of c|t


BIN$(v|n)

Returns the binary-string value of argument v|n


CHAR$(c|t, v|n)

Returns the v|n th character in text string c|t


CHR$(v|n)

Returns a one-character text string with the character corresponding to the ASCII code indicated by argument v|n


DATE$

Returns the current date based on the computer's internal clock as a string in the form "DD/MM/YYYY"

Notes:


HEX$(v|n)

Returns the hexadecimal-string value of argument v|n


LCASE$(c|t)

Returns c|t converted to lower case


LEFT$(c|t, v|n)

Returns the v|n number of leftmost characters of c|t


LTRIM$(c|t)

Returns c|t after having removed leading blank spaces from c|t


MID$(c|t, v|n1, v|n2)

Returns the v|n2 part (length) of the text string c|t starting from position v|n1


OCT$(v|n)

Returns the octal-string value of argument v|n


RIGHT$(c|t, v|n)

Returns the v|n number of rightmost characters of c|t


RTRIM$(c|t)

Returns c|t after having removed trailing blank spaces from c|t


SPACE$(v|n)

Returns a text string of blank spaces v|n bytes (characters) long


STR$(v|n1, v|n2)

Returns a text string giving the representation of the argument v|n1 with the number v|n2 of decimals to return

Note for 2nd argument (v|n2):


TIME$

Returns the current time based on the computer's internal clock as a string in the form "HH:mm:ss"

Notes:


TRIM$(c|t)

Returns c|t after having removed leading and trailing blank spaces from c|t


UCASE$(c|t)

Returns c|t converted to upper case


WORD$(c|t, v|n)

Returns the v|n th word in text string c|t

Notes: